
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <title>后台管理</title>
    <link href="/css/login.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="login_box">
    <div class="login_l_img"><img src="/images/login-img.png" /></div>
    <div class="login">
        <div class="login_logo"><a href="#"><img src="/images/login_logo.png" /></a></div>
        <div class="login_name">
            <p>用户注册</p>
        </div>
        <form id="regForm" method="post" enctype="application/x-www-form-urlencoded">
            <input name="username" type="text"  value="用户名" onfocus="this.value=''" onblur="if(this.value==''){this.value='用户名'}">
            <span id="password_text" onclick="this.style.display='none';document.getElementById('password').style.display='block';document.getElementById('password').focus();" >密码</span>
            <input name="password" type="password" id="password" style="display:none;" onblur="if(this.value==''){document.getElementById('password_text').style.display='block';this.style.display='none'};"/>
            <input value="注册" style="width:100%;" type="button" id="reg_button"/>
        </form>
    </div>
    <div class="copyright">某某有限公司 版权所有©2016-2018 技术支持电话：000-00000000</div>
</div>
</body>
<script type="text/javascript" src="/js/lib/jquery.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#reg_button").on('click',function () {
            var username = $("input[name='username']").val();
            var password = $("input[name='password']").val();
            $.ajax({
                url: "/authentication/signup",
                type:"get",
                dataType: "json",
                contentType: "application/json",
                data: {
                    userName: username,
                    password: password
                },
                success: function (result) {
                    alert("注册成功");

                },error:{

                }
            });
        });
    });
</script>
</html>
